﻿using System.ComponentModel.DataAnnotations;
using YNTK.Common.Enum;
using YNTK.Common.Filter;
using YNTK.Dependency;

namespace YNTK.FileRecord.Entitys
{
    /// <summary>
    /// 添加工作记录请求模型
    /// </summary>
    [SuppressSniffer]
    public class AddWorkRecordRequestModel
    {
        /// <summary>
        /// 文件清单分类id
        /// </summary>
        [Required(ErrorMessage = "文件清单分类标识不能为空")]
        public string classifyId { get; set; }

        /// <summary>
        /// 工作项/事项id
        /// </summary>
        [Required(ErrorMessage = "工作项/事项标识不能为空")]
        public string workItemId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage = "标题不能为空")]
        public string title { get; set; }

        /// <summary>
        /// 共享范围(0.全组织 1.特定机构 2.特定角色 3.特定用户 4.仅自己可见)
        /// </summary>
        [Required(ErrorMessage = "请选择共享范围")]
        public SharedScopeEnum sharedScope { get; set; }

        /// <summary>
        /// 共享范围,多个机构/角色/用户按逗号分割,SharedScope为0或4时为空
        /// </summary>
        public string sharedScopeValue { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public long? sortCode { get; set; }

        /// <summary>
        /// 启用/禁用,1.启用
        /// </summary>
        public int? enabledMark { get; set; }

        /// <summary>
        /// 浏览次数
        /// </summary>
        public int viewCount { get; set; }

        /// <summary>
        /// 相关附件数据
        /// </summary>
        public List<CommonFileRequestModel> fileData { get; set; }

        /// <summary>
        /// 动态字段数据
        /// </summary>
        public List<CommonDynamicFieldsRequestModel> dynamicData { get; set; }
    }
}
